<template>
  <div class="query-test">
    <el-skeleton v-if="list.length === 0" />
    <ul v-else>
      <li v-for="(item, index) in list" :key="index">
        {{ item }}
      </li>
    </ul>
  </div>
</template>

<script>
import api from "@/api";

export default {
  name: "query-test",
  data() {
    return {
      list: [],
    };
  },
  async created() {
    let { code, list } = await api.queryData();
    if (+code === 0) {
      this.list = list;
    }
  },
};
</script>